$().ready(function() {
	// 提交时验证表单
	var validator = $("VerifyIdentity").validate({
		errorPlacement: function(error, element) {
			// Append error within linked label
			$( element )
				.closest( "form" )
					.find( "label[for='" + element.attr( "id" ) + "']" )
						.append( error );
		},
		errorElement: "span",
		messages: {
			realname: {
				required: " (必需字段)",
				minlength: " (不能少于 2 个字符)"
			},
			idcard: {
				required: " (必需字段)",
				minlength: " (字段为18个字符)",
				maxlength: " (字段为18个字符)"
			},
			
		}
	});
});